import request from "@/utils/request";


const API_BASE_URL = 'http://127.0.0.1:9999';

//手机发送验证码
export const sendPhoneCode = (user) => {
    return request.post(`${API_BASE_URL}/api/msm/sendPhoneCode`,  JSON.stringify(user),{
        headers: {
            'Content-Type': 'application/json'
        }
    });
};
//邮箱发送验证码
export const sendEmailCode = (user) => {
    return request.post(`${API_BASE_URL}/api/msm/sendEmailCode`,  user);
};
//手机号登录
export const phoneLogin = (user) => {
    return request.post(`${API_BASE_URL}/user/login/phoneCode`,  user);
};
//邮箱验证码登录
export const emailLogin = (user) => {
    return request.post(`${API_BASE_URL}/user/login/emailCode`,  user);
};
